package com.neusoft.tijiancms.mapper;

import com.neusoft.tijiancms.po.OverallResult;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface OverallResultMapper {
	/**
	 * 根据orderId查询总检列表
	 * @param orderId
	 * @return
	 */
	@Select("select * from overallResult where orderId=#{orderId} order by orId")
	public List<OverallResult> listOverallResultByOrderId(Integer orderId);

	/**
	 * 添加总检信息
	 * @param overallResult
	 * @return
	 */
	@Insert("insert into overallResult values(null,#{title},#{content},#{orderId})")
	public int saveOverallResult(OverallResult overallResult);

	/**
	 * 更新
	 * @param overallResult
	 * @return
	 */
	@Update("update overallResult set title=#{title},content=#{content} where orId=#{orId}")
	public int updateOverallResult(OverallResult overallResult);

	/**
	 * 删除
	 * @param orId
	 * @return
	 */
	@Delete("delete from overallResult where orId=#{orId}")
	public int removeOverallResult(Integer orId);
}
